package com.itheima.set;

import java.util.HashSet;
import java.util.Set;

public class Demo01 {

    public static void main(String[] args) {
        Set<String> set= new HashSet<>();
        set.add("啊啊");
        set.add("鹿鹿");
        set.add("滔滔");
        set.add("坤坤");
        set.add("签签");
        System.out.println(set);
        boolean flag = set.add("坤坤");
        System.out.println(flag);
        System.out.println(set);

        set.remove("签签");
        System.out.println(set);

       // set.removeIf(s->s.length()==2);
        System.out.println(set);
        System.out.println(set.isEmpty());
        System.out.println(set.size());
        System.out.println(set.contains("签签"));
        set.clear();
        System.out.println(set.isEmpty());
        System.out.println(set.size());
        System.out.println(set.contains("坤坤"));

    }
}
